package com.printer;

public class Printer {
	private Ink ink;
	private Paper paper;

	public Printer() {
		super();
	}

	public Printer(Ink ink, Paper paper) {
		super();
		this.ink = ink;
		this.paper = paper;
	}
	
	public void print(String str) {
		for (int i = 0; i < str.length(); i++) {
			paper.printChar(str.charAt(i));
		}
		System.out.println(ink.getColor() + "打印机正在打印...\n");
		System.out.println(paper.getContent());
	}
}
